package Exc.controller;

import Exc.domain.JSONResult;
import Exc.domain.Manager;
import Exc.service.IManagerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @author fengke
 */
@Controller()
@RequestMapping("/login")
public class LoginController {
    @Autowired
    private IManagerService managerService;

    @RequestMapping("/listManager")
    @ResponseBody
    public JSONResult listManager() {
        List<Manager> managerList = managerService.listManager();
        JSONResult jsonResult = new JSONResult(true, "返回账号信息", managerList);
        return jsonResult;
    }
}
